package com.superms.system.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.netflix.discovery.EurekaClient;
import com.superms.system.dao.entity.ModuleEntity;
import com.superms.system.dao.mapper.ModuleEntityMapper;
import com.superms.system.dto.param.ModuleParam;

@Service
public class ModuleService {

	private @Autowired ModuleEntityMapper moduleMapper;
	
	private @Autowired EurekaClient eurekaClient;
	
	public List<ModuleEntity> findAllModules(){
		List<ModuleEntity> list = moduleMapper.selectAll();
		
		for (ModuleEntity moduleEntity : list) {
			buildModuleInfo(moduleEntity);
		}
		
		return list;
	}
	
	public void addModule(ModuleParam param){
		
	}
	
    public void updateModule(ModuleParam param){
		
	}
    
    public void switchModule(Integer id,boolean enable){
    	
    }
    
    private void buildModuleInfo(ModuleEntity entity){
    	
    }
}
